BIN=log
CIN=server1
DIN=client1
EIN=server2
FIN=client2
GIN=server3
HIN=client3

.PHONY: all
all: $(BIN) $(CIN) $(DIN) $(EIN) $(FIN) $(GIN) $(HIN)

$(BIN): log.cc
	g++ -o $@ $^ -std=c++17 -lpthread

$(CIN): server1.cc
	g++ -o $@ $^ -std=c++17 -lpthread

$(DIN): client1.cc
	g++ -o $@ $^ -std=c++17 -lpthread

$(EIN): server2.cc
	g++ -g -o $@ $^ -std=c++17 -lpthread

$(FIN): client2.cc
	g++ -o $@ $^ -std=c++17 -lpthread

$(GIN): server3.cc
	g++ -o $@ $^ -std=c++17 -lpthread

$(HIN): client3.cc
	g++ -o $@ $^ -std=c++17 -lpthread

.PHONY: clean
clean:
	rm -rf $(BIN) $(CIN) $(DIN) $(EIN) $(FIN) $(GIN) $(HIN)